home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9404 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  915 b 

  1. Path: news.aimnet.com!news
  2. From: chips@pacx.com (Chip)
  3. Newsgroups: comp.lang.c++
  4. Subject: Pointers to floating points
  5. Date: Fri, 01 Mar 1996 15:57:19 GMT
  6. Organization: IMV Internet
  7. Message-ID: <4h76m0$2n0@news.aimnet.com>
  8. NNTP-Posting-Host: dial-milp-23.iway.aimnet.com
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. I am using Turbo C++ 3.0 for DOS. When compiling this code:
  12.  
  13. float calcPayment ()
  14. {
  15.     float temp, temp2;                          //Holding variables
  16.     temp = (*Principal * *Interest) * pow(1 + *Interest, *Months);
  17.  
  18.     temp2 = pow(1 + *Interest, *Months) - 1;            
  19.     return (temp / temp2);                  //Return the value
  20. }
  21.  
  22. I get the error "illegal use of floating point" in several places.
  23. When I looked up the error, it said that pointers to floating points
  24. cannot be used... is this true, people? Is that a characteristic of
  25. pointers, or is there something I am missing?
  26.  
  27. Thank you.
  28.  
  29.